package di

import (
	"fmt"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/http_server/controller"
	"git.mycaigou.com/gfyx/micro-gfyx-oppty-service/http_server/controller/common"
)

func (c *Inject) InjectController() {
	controllers := []interface{}{
		common.NewProfitController,
		controller.NewHealthController,
	}
	var errs []error
	for _, constructor := range controllers {
		err := c.Provide(constructor)
		if err != nil {
			errs = append(errs, err)
		}
	}

	fmt.Printf("InjectController errors:%+v\n", errs)
}
